<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include_once("php_clases/db_main.php");
include_once("commonLibrary.php");
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/JSBasicFunctions.js"></script>

<title>-Carga de usuarios-</title>
        <link rel="stylesheet" type="text/css" href="css/style.css" />		
		
</head>
<body>
<script>
	var dhxWins = new dhtmlXWindows();
	dhxWins.setSkin("dhx_web");
	var win;
	var mygrid;
	function closeWindow(){
		win.close();
	}
</script>
<br>
<br>
<a href='#'  onClick="openWindow('exportaDatos',100,100,450,500,'Exportar usuarios','winExportar.php')">Exportar</a>
<br>
<br>
<?php
$sql="SELECT cellphone,city FROM smsusers";
$datos=new dbm_DataBaseManager;
$resQuery=$datos->selectSQL($sql);
echo"<center>";
echo "<table  align=center border=1 bordercolor='#1471AA'>"; 
echo"<tr>";
	echo"<th>"."Telefono"."</th>";
	echo"<th>"."Cuidad"."</th>";
echo"</tr>";
foreach(json_decode($resQuery) as $obj)
{
	echo"<tr>";
    echo "<td ><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>".$obj->cellphone."</font></td>"; 
    echo "<td ><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>".$obj->city."</font></td>";
	echo"</tr>";	
}
echo "</table>"; 
echo"</center>";        
?>
	<div class="content loadData">
		
		<form action="importaDatos.php" method="post" enctype="multipart/form-data">			
			<h2>Carga de Usuarios</h2>		
			
			<div>
				<input type="hidden" name="MAX_FILE_SIZE" value="100000">			
				<b>Subir archivo: </b>			
				<input name="usersFile" type="file" class="btnData">
			</div>	
			
			<div>			
				<br>
				<input type="submit" value="Cargar" class="btnData">
			</div>
		</form>
		<div>
			<a href="exportaDatos.php"><img src="img/Download.png" border="0" height="60px" width="60px" alt="Exportar"/></br>Exportar </a>
		</div>
		

	</div> 
</body>
</html>